feat(runtime-host): schedule managed update reconciliation - #3750
feat(runtime-host): schedule managed update reconciliation#3750me2seeks wants to merge 1 commit into
Conversation
Generated-by: Codex
cce303a to
c623ed6
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed this head and found blocking issues.
[P2] Repair verifies authored files but not effective schedule
runtime-host-systemd-update-scheduler.ts:104-125 checks service/timer files and is-enabled/active, but an override override.conf changing ExecStart or OnCalendar still passes verification while the effective scheduler is different or inactive. Needs FragmentPath/DropInPaths checks like the Host service verifier.
[P2] Missed wake can defer checks by a full cadence
The scheduler decides due from modulo of current epoch hour with no last-check. For a 4h interval, a missed wake (sleep through phase) causes immediate timer run to be considered not_due, deferring next check by another full interval (up to nearly a week at 168h).
Minor note: combined scheduler+service log truncation can erase scheduler diagnostics when service logs are large.
Checks on c623ed60a are test: success.
简体中文
存在修复验证与调度遗漏两项阻断。|
Before reviewing the implementation details, could you clarify the product scope and canonical proposal?
These choices determine whether the added scheduler/cadence contracts are necessary and which implementation has the correct lifecycle owner, so I think they need to be explicit before line-level review. |
EnglishThanks — these questions expose a duplicate proposal, and the canonical answer is now clear. #3747 was opened before #3750, and #3228 recorded #3747 as the scheduler slice before this PR was created. I missed that tracker update. #3750 is not intended to replace #3747, and after comparing both implementations there is no distinct scheduler outcome that justifies maintaining two proposals. The concrete disconnected workflow is an opted-in automatic policy on a managed remote computer that may run without Desktop or a CLI Client attached. #3747 already provides that outcome by invoking #3720's bounded one-shot reconciler from a derived OS resource. Reconcile-on-connect and explicit update remain sufficient for manual policy; service-start-only discovery is insufficient for a long-running remote Host, but that does not distinguish #3750 from #3747. The configurable #3747 also has the cleaner lifecycle contract: an explicit user I am therefore closing #3750 as superseded by #3747. I will not move the untracked configurable-cadence proposal into #3747. If a concrete product requirement for per-installation cadence is established later, it should be a separate follow-up proposal built on the canonical scheduler rather than a competing implementation. 简体中文感谢指出。这些问题揭示了重复 proposal,现在 canonical 结论已经明确。 #3747 早于 #3750 创建,并且 #3228 在本 PR 创建前已经把 #3747 记录为 scheduler slice;我漏看了该 tracker 更新。#3750 并不应替代 #3747。比较两套实现后,也没有足以维护第二套 proposal 的独立 scheduler 用户结果。 具体的 disconnected workflow 是:用户为受管远端电脑启用自动策略后,即使 Desktop 或 CLI Client 没有连接,电脑仍能执行更新 reconciliation。#3747 已通过 OS 派生资源调用 #3720 的有界 one-shot reconciler 来满足该结果。manual policy 使用 reconnect reconciliation 或显式 update 已足够;仅在 service start 时检查无法覆盖长期运行的远端 Host,但这也不能区分 #3750 与 #3747。 #3750 中的 #3747 的 lifecycle contract 也更干净:用户显式执行 因此我会关闭 #3750,由 #3747 取代。我不会把尚未形成正式需求的可配置周期塞入 #3747。如果以后建立了明确的 per-installation cadence 产品需求,应基于 canonical scheduler 单独提出 follow-up,而不是维护竞争实现。 |
|
Closing as superseded by #3747, per the scope analysis above. |
English
Summary
systemd --user) and macOS (LaunchAgent)1hthrough168hand default to6h;manualperforms no registry discovery or mutationservice reconcile-updateremains an immediate user-requested check6hdefaultOnly a Maka-managed deployment receives this schedule. A transient
npxinvocation does not become background update authority by itself; an explicit managed setup does. Persistent global-CLI services and SSH clients do not acquire replacement or remote deployment authority.Builds on #3720, now merged. This branch is rebased onto the merge and contains only the scheduler/cadence change.
Refs #3228
Refs #3709
Verification
npm --workspace maka-agent test— 457 passed after rebasing onto merged feat(runtime-host): add managed update reconciliation #3720npm run lintnpm run format:checknpm run typecheck(after building the UI declarations required by Desktop)npm run check:asf-headersReview focus
manualand not-due paths return before registry accessAI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented, tested, documented, and simplified the change under maintainer direction. Human review is required before merge.
Checklist
Does this PR entail a change in behavior?
简体中文
摘要
systemd --user)与 macOS(LaunchAgent)上的每个 Maka 托管 Runtime Host deployment 安装由操作系统持有的每小时唤醒任务1h至168h,默认6h;manual不执行 registry discovery 或 mutationservice reconcile-update则始终立即检查6h只有 Maka 托管的 deployment 会获得该 schedule。一次临时
npx调用本身不会成为后台更新 authority;用户显式执行 managed setup 才会创建它。持久全局 CLI service 与 SSH Client 都不会因此获得替换或 remote deployment authority。基于已经合入的 #3720;当前分支已 rebase 到其 merge 之后,只包含 scheduler/cadence 变更。
关联 #3228
关联 #3709
验证
npm --workspace maka-agent test— rebase 到已合入的 feat(runtime-host): add managed update reconciliation #3720 后 457 项通过npm run lintnpm run format:checknpm run typecheck(先构建 Desktop 所需的 UI declaration)npm run check:asf-headers审查重点
manual与尚未到期的定时路径都会在访问 registry 前返回AI 使用
OpenAI Codex 在维护者指导下实现、测试、撰写文档并简化本次变更;合入前仍需人工审查。
Checklist